﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class gop_y : System.Web.UI.Page
{
    private string Connect = ConfigurationManager.ConnectionStrings["ketnoi"].ConnectionString;
    SqlConnection con;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btngui_Click(object sender, EventArgs e)
    {
        con = new SqlConnection(Connect);
        try
        {
            con.Open();
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = con;
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "SP_InS_GOPY";
            cmd.Parameters.AddWithValue("@HOVATEN", txthovaten.Text);
            cmd.Parameters.AddWithValue("@EMAIL", txtemail.Text);
            cmd.Parameters.AddWithValue("@TIEUDE", txttieude.Text);
            cmd.Parameters.AddWithValue("@NOIDUNG", FCKeditor1.Value.ToString());
            cmd.Parameters.AddWithValue("@NGAY_GUI", DateTime.Now.ToShortDateString());
            cmd.ExecuteNonQuery();
            Response.Redirect("gop_Y_okk.aspx");
        }
        catch
        {
 
        }
        con.Dispose();
        con.Close();
    }
    protected void btnxoachu_Click(object sender, EventArgs e)
    {
        txttieude.Text = txthovaten.Text = txtemail.Text = FCKeditor1.Value = "";
    }
}
